<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>bind</title>
</head>

<body>
  <script>

    var obj = {
      age: 18
    }

    function fun(something, other){
      console.log("this.age ==> ", this.age);
      console.log("something ==> ", something);
      console.log("other ==> ", other);
    }

    // 柯里化
    var bar = fun.bind(obj, 6)
    

    // fun()

    bar()
    bar(5)

  </script>
</body>

</html>